package com.itheima.service;

import com.itheima.admin.dishpojo.Dish;
import com.itheima.mapper.client.ClientDishMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author wuzhiyong
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ClientDishService {
    @Autowired
    private ClientDishMapper clientDishMapper;

    /**
     * 菜品列表
     *
     * @param categoryId categoryId
     * @param status     status
     * @return List<Dish>
     */
    public List<Dish> getByCategoryIdAndStatus(String categoryId, Integer status) {
        return clientDishMapper.selectByCategoryIdAndStatus(categoryId, status);
    }
}
